//
//  NSMutableDictionary+Extension.m
//  ForChangZhou
//
//  Created by 布丁 on 2020/10/3.
//  Copyright © 2020 KMasker. All rights reserved.
//

#import "NSMutableDictionary+Extension.h"



@implementation NSMutableDictionary (Extension)


@end



@implementation NSDictionary (Extension)

- (NSString *)tojsonString {


    if (![NSJSONSerialization isValidJSONObject:self]) {

        return nil;

    }

    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self options:0 error:nil];

    NSString *strJson = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];

    return strJson;

}


@end

